<?php
	
	$user = $controller->getCurrentUser();
	
	//on verifie les permissions
	if ($user->getGrade()->getType() == GRADE_TYPE_ADMIN)
	{
		$count = countPermActions();
		
		$options = array(
			'nb_datas' => $count, 
			'data_per_page' => 20, 
			'nb_link_per_page' => 3, 
			'url' => 'bdbdec.php?action=adminPermaction', 
			'var_page' => 'p' 
		);
			
		$pagination = new Pagination($options);
		$pagination->separator = '-';

		$listPermaction = getPermActionsList($pagination);
		$controller->setVar('listPermaction',$listPermaction);
		$controller->setVar('pagination',$pagination);
		$controller->render('adminPermaction');
	}
	else
		$controller->render('errorRights');

?>